import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Add {
    static List<List<Integer>> res = new ArrayList<>();
    static List<Integer> path = new ArrayList<>();
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        while(s.hasNext()) {
            int n = s.nextInt();
            int m = s.nextInt();
            dfs(n,m,0,1);
            int deph = 0;
            for(List<Integer> list : res) {
                for(int i = 0; i < list.size(); i++) {
                    if(i != list.size() - 1) {
                        System.out.print(list.get(i));
                    }else {
                        System.out.println(list.get(i));
                    }
                }
            }
            res.clear();
            path.clear();
            System.out.println();
        }
    }
    public static void dfs(int n,int m,int sum,int depth) {
        if(sum > m || depth > n + 1) {
            return;
        }
        if(sum == m) {
            res.add(new ArrayList<>(path));
        }
        for(int i = depth; i <= n; i++) {
            sum += i;
            path.add(i);
            dfs(n,m,sum,i + 1);
            sum -= i;
            path.remove(path.size() - 1);
        }
    }
}
